// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 此处后端没有提供注释 GET /chat/agentChat */
export async function agentChat(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.agentChatParams,
  options?: { [key: string]: any },
) {
  return request<API.SseEmitter>(`/api/chat/agentChat`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /chat/get_rights */
export async function getRights(options?: { [key: string]: any }) {
  return request<API.BaseResponseListString>(`/api/chat/get_rights`, {
    method: 'GET',
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /chat/memory_stream_chat_sse */
export async function memoryStreamChatSse(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.memoryStreamChatSSEParams,
  options?: { [key: string]: any },
) {
  return request<API.SseEmitter>(`/api/chat/memory_stream_chat_sse`, {
    method: 'GET',
    params: {
      // collectionName has a default value: jira
      collectionName: 'jira',
      ...params,
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /chat/streamChat */
export async function streamChat(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.streamChatParams,
  options?: { [key: string]: any },
) {
  return request<string[]>(`/api/chat/streamChat`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /chat/test */
export async function test(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.testParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponse>(`/api/chat/test`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /chat/upload_speed */
export async function uploadSpeed(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.uploadSpeedParams,
  body: {},
  options?: { [key: string]: any },
) {
  return request<API.BaseResponse>(`/api/chat/upload_speed`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      // collectionName has a default value: jira
      collectionName: 'jira',
      // maxSegmentLength has a default value: 1000
      maxSegmentLength: '1000',
      // overlapLength has a default value: 200
      overlapLength: '200',
      // separator has a default value: \n\n
      separator: '\n\n',
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /chat/upload2 */
export async function uploadFile2(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.uploadFile2Params,
  body: {},
  options?: { [key: string]: any },
) {
  return request<API.BaseResponse>(`/api/chat/upload2`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      // collectionName has a default value: jira
      collectionName: 'jira',
      // maxSegmentLength has a default value: 1000
      maxSegmentLength: '1000',
      // overlapLength has a default value: 200
      overlapLength: '200',
      // separator has a default value: \n\n
      separator: '\n\n',
      // batchSize has a default value: 1000
      batchSize: '1000',
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /chat/uploadbak */
export async function uploadFileBak(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.uploadFileBakParams,
  body: {},
  options?: { [key: string]: any },
) {
  return request<API.BaseResponse>(`/api/chat/uploadbak`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      // collectionName has a default value: jira
      collectionName: 'jira',
      // maxSegmentLength has a default value: 1000
      maxSegmentLength: '1000',
      // overlapLength has a default value: 200
      overlapLength: '200',
      // separator has a default value: \n\n
      separator: '\n\n',
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /chat/uploadFileChat */
export async function uploadFileChat(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.uploadFileChatParams,
  body: {},
  options?: { [key: string]: any },
) {
  return request<API.BaseResponse>(`/api/chat/uploadFileChat`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      // collectionName has a default value: jira
      collectionName: 'jira',
      // maxSegmentLength has a default value: 1000
      maxSegmentLength: '1000',
      // overlapLength has a default value: 200
      overlapLength: '200',
      // separator has a default value: \n\n
      separator: '\n\n',
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}
